package com.disruptor;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;

/**
 * 支持WorkerPool WorkHandler模式
 * 支持BatchEventProcessor模式
 */
public class LongCommonHandler implements WorkHandler<LongEvent> ,EventHandler<LongEvent> {

    public void onEvent(LongEvent longEvent) throws Exception {
        System.out.println("Event: " + longEvent);
    }

    public void onEvent(LongEvent longEvent, long l, boolean b) throws Exception {
        this.onEvent(longEvent);
    }
}
